import { requests } from "../requests"

export const reqMenu = () => {
    return requests({
        url: "/course/menu",
        method: 'get',
    })
}

export const reqCoursePage = (data) => {
    return requests({
        url: "/course/list",
        method: 'get',
        params: data
    })
}

export const reqCourseOverview = (data) => {
    return requests({
        url: "/course/getCourseOverview",
        method: 'get',
        params: data
    })
}

export const reqVerifyCourseBuy = (data) => {
    return requests({
        url: "/course/verifyBuy/" + data.courseId,
        method: 'post',
    })
}

export const reqCouerseDirectory = (data) => {
    return requests({
        url: "/course/getCourseDirectory",
        method: 'get',
        params: data
    })
}

export const reqCoueseManageList = (data) => {
    return requests({
        url: "/course/manage/list",
        method: 'get',
        params: data
    })
}

export const reqCourseManageInfo = (data) => {
    return requests({
        url: "/course/manage/info",
        method: 'get',
        params: data
    })
}

export const reqUpdateCourse = (data) => {
    return requests({
        url: "/course/manage/updateInfo",
        method: 'put',
        data: data
    })
}

export const reqRemoveCourse = (data) => {
    return requests({
        url: "/course/manage/deleteInfo/" + data,
        method: 'delete',
    })
}

export const reqCoueseOrderSave = (data) => {
    return requests({
        url: "/course/order/save",
        method: 'post',
        data: data
    })
}

export const reqUserCourseOrderList = (data) => {
    return requests({
        url: "/course/order/list",
        method: 'get',
        params: data
    })
}

export const reqUserCourseOrderInfo = (data) => {
    return requests({
        url: "/course/order/info",
        method: 'get',
        params: data
    })
}

export const requpdateDirectory = (data) => {
    return requests({
        url: "/course/manage/updateDirectory",
        method: 'put',
        data: data
    })
}

export const reqSaveDirectory = (data) => {
    return requests({
        url: "/course/manage/saveDirectoryItem",
        method: 'post',
        data: data
    })
}